Re: [NTG-context] multi-page floats

2012-06-05 Thread luigi scarso
On Tue, Jun 5, 2012 at 2:00 PM, Henning Hraban Ramm hra...@fiee.net wrote: Sorry for coming back again and again, but I’m still stuck, and my deadline is overdue. * I need full-page pictures on defined pages in the middle of a chapter. * I don’t care if I must define on page x or on the next

Re: [NTG-context] multi-page floats

2012-06-05 Thread Henning Hraban Ramm
can’t get layers working within postponing. And when that works, I need to wrap it in a macro, since I alway need to define and postpone three sequential pages. Without postponing, this works: --- *** --- \setuppagenumbering[alternative=doublesided] \definelayer[bg][x=0mm,y=-3mm,width=\dimexpr

Re: [NTG-context] First and last lines on a grid

2011-04-23 Thread Oliver Buerschaper
This should do the trick: \define[1]\PagenumberCommand {\smash[d]{#1}} \setuppagenumbering [ strut=no, command=\PagenumberCommand] And how well it does it! Now I managed to align the last line of the grid with the textblock's frame: --- \definemeasure [gridWidth] [\dimexpr

Re: [NTG-context] multi-page floats

2012-06-05 Thread Wolfgang Schuster
Am 05.06.2012 um 14:00 schrieb Henning Hraban Ramm: Sorry for coming back again and again, but I’m still stuck, and my deadline is overdue. * I need full-page pictures on defined pages in the middle of a chapter. * I don’t care if I must define on page x or on the next right page after

Re: [NTG-context] multi-page floats

2012-06-05 Thread Henning Hraban Ramm
Am 2012-06-05 um 19:55 schrieb Wolfgang Schuster: Sorry for coming back again and again, but I’m still stuck, and my deadline is overdue. * I need full-page pictures on defined pages in the middle of a chapter. * I don’t care if I must define on page x or on the next right page after

[NTG-context] Putting things over a figure

2006-04-23 Thread nico
interface (layer?) could do the same. Any comment or improvement is welcome. \newdimen\overfigwd \newdimen\overfight % Put the figure and define the x/y percentage factor for the calspairs. \def\startoverfig {\dodoubleempty\dostartoverfig} \def\dostartoverfig[#1][#2]% {\bgroup

Re: [NTG-context] Putting things over a figure

2006-04-23 Thread Hans Hagen
, but maybe a higher level interface (layer?) could do the same. Any comment or improvement is i'd go for layers welcome. \newdimen\overfigwd \newdimen\overfight % Put the figure and define the x/y percentage factor for the calspairs. \def\startoverfig {\dodoubleempty\dostartoverfig

[NTG-context] new units

2023-05-04 Thread Hans Hagen via ntg-context
article in TB will explain the details of the process and also a careful mathematical annalysis of how we reached the right value with a high precission. The actual implementation is the most boring part. \starttext \startTEXpage[offset=1ts] Hello World! \the\dimexpr 1ts \the\dimexpr

Re: [NTG-context] background color, was: CMYK Color profile

2019-05-31 Thread Benjamin Koppe
. \definepageshift [flyer] [horizontal] [\dimexpr\measure{bleed}-\measured{shortfold}\relax, \measure{bleed}, \measure{bleed}, \dimexpr2\measured{shortfold}+\measured{bleed}\relax, \measure{bleed}, \dimexpr\measure{bleed}-\measured{shortfold}\relax

Re: [NTG-context] Feature Request: ToC page number alternative

2014-02-26 Thread Wolfgang Schuster
title would be useful. \unprotect \define[3]\SectionToCEntry{% \hbox \strc_lists_get_reference_attribute\v!all{% \par \leftaligned\bgroup \hbox to 2em{#3}% \hskip 1em \vtop{\hsize\dimexpr\textwidth-3em\relax#2} \egroup \par% } } \protect \setuplist

Re: [NTG-context] table: vertical distance

2010-04-17 Thread Wolfgang Werners-Lucchini
\define[1]\divisionrule {\dontleavehmode\blap {\vskip-\strutht \blackrule[width=\the\dimexpr.5em*#1\relax,height=2\linewidth]}% \vskip-\lineheight} Ahh! Yes, this helps a lot. Thank you very much! Wolfgang

Re: [NTG-context] about the defining itemized columns.

2018-07-26 Thread Jeong Dal
Dear Hans, Thanks for the solution. It works perfectly. Best regards, Dalyoung >> define[1]\iCol > {\starttabulate[|*{#1}{|lw(\dimexpr.84\makeupwidth/#1\relax)|}]} > ___ If your question is of intere

Re: [NTG-context] new units

2023-05-06 Thread Alan Braslau via ntg-context
is the most boring part. > > \starttext > > \startTEXpage[offset=1ts] > Hello World! > > \the\dimexpr 1ts > > \the\dimexpr 1es > > \the\dimexpr 1eu > > \eufactor20 > > \the\dimexpr 1eu > \stopTEXpage > > \stoptext >

[NTG-context] postponed processing

2006-01-15 Thread Henning Hraban Ramm
Me again... I'd like to define an address layer in my environment: --- start env -- \definelayer[senderlayer] [x=0mm, y=0mm, width=\paperwidth, height=\paperheight] \def\Sender#1#2#3{\setvalue{SenderKey#1}{#2}\setvalue{SenderVal#1}{#3}} \def\GetSenderLine#1{\bTR\bTD\doiftextelse

[NTG-context] Caption location with vertical \startplacefigure

2015-04-16 Thread Rik Kabel
and earlier versions, so it does not appear to be a regression.) \showframe \setuppapersize[A4][A3,landscape] \useMPlibrary[dum] %% Enable the first set of three for wider picture margins, %% and the second set of three for standard picture margins \def\FullWidth{\the\dimexpr

Re: [NTG-context] Command that does not give the expected result (Metafun)

2015-08-10 Thread Wolfgang Schuster
Fabrice Couvreur mailto:fabrice1.couvr...@gmail.com 10. August 2015 09:13 Dear Hans, I tested without understanding what \unexpanded, and of course it works! You can use ConTeXt’s \define command where you don’t have to think about \unexpanded etc., e.g. \define[2]\ChapterCommand {\setbox

Re: [NTG-context] background color, was: CMYK Color profile

2019-06-02 Thread Benjamin Koppe
nepageshift > [flyer] > [horizontal] > [\dimexpr\measure{bleed}-\measured{shortfold}\relax, > \measure{bleed}, > \measure{bleed}, > \dimexpr2\measured{shortfold}+\measured{bleed}\relax, > \measure{bleed}, > \dimexpr\measure{bleed}-\measured{s

[NTG-context] DIN lang folder with crop marks

2019-04-10 Thread Benjamin Koppe
. \setuparranging [TRYPTICHON] %% Because of the shorter folded page and the bleed the pages has %% to be shifted horizontally on the printed sheet. %% The values are calculated here. \definepageshift [flyer] [horizontal] [\dimexpr\measure{bleed}-\measured{shortfold}\relax

[NTG-context] custom itemize

2006-08-04 Thread Renaud AUBIN
Hi all, Some times ago, Taco helps me to define a custom itemize: \setbox0=\hbox{--~} \def\indenteddash#1{\hskip\parindent--~} \definesymbol[indentdash][\indenteddash] \setupitemize[each][indentdash,packed,joinedup,intext][indentnext=yes,width=\dimexpr \parindent + \wd0 \relax] The result

Re: [NTG-context] custom itemize

2006-08-04 Thread Taco Hoekwater
Renaud AUBIN wrote: Hi all, Some times ago, Taco helps me to define a custom itemize: \setbox0=\hbox{--~} \def\indenteddash#1{\hskip\parindent--~} \definesymbol[indentdash][\indenteddash] \setupitemize[each][indentdash,packed,joinedup,intext][indentnext=yes,width=\dimexpr

Re: [NTG-context] Table of Contents Header?

2021-12-30 Thread kauśika via ntg-context
TOCpar] [3] [width=\dimexpr\TOCPageLabelWidth, align=middle] Finally, wrap it all up in the macro \define[3]\TOCEntry{% \startTOC #1 \TOCpar #2 \TOCpar #3% \stopTOC% } and indicate the command to use in the setup \setuplist [c

Re: [NTG-context] Newbie questions

2006-06-28 Thread Thomas Moore
. Also, I am assuming that the colon is simply part of the name assigned to this setup and has no other significance: is this right? 3. So, my guess (once problem 1 is fixed), is that I will define *two* layers (one for right pages and one for left pages), and do a \setupbackground [rightpage

Re: [NTG-context] Linebreak in a framed for a chapter setuphead

2012-02-29 Thread Wolfgang Schuster
size, on the right side. The \mychap seems to work while used directly. Any solution? \define[2]\mychap {\framed [frame=off,width=broad,align=flushleft,bottomframe=on,offset=0pt] {\setbox\scratchbox\hbox{#1}% \vtop{\hsize\dimexpr\hsize-\wd\scratchbox\relax#2

Re: [NTG-context] expansion problem: random location

2019-09-13 Thread Wolfgang Schuster
=.4\textwidth} \startplacefigure[location={#1},title={#1 \fakewords{3}{20}}] \externalfigure[place #1][width=\PicWidth,height=\dimexpr\textheight * \imgH / 10 \relax] \stopplacefigure } Put the value of the random location in a macro. \define[1]\Blindbild   {\edef\PicLocation{#1

Re: [NTG-context] Custom list layout with PDF bookmarks

2020-05-16 Thread Wolfgang Schuster
[option=bookmark] \define[3]\SectionListEntry {\par \leftaligned\bgroup \hbox to 2em{#3}% \hskip 1em \vtop{\hsize\dimexpr\textwidth-3em\relax#2} \egroup \par} % Comment out this next line to regain section hyperlinks in the ToC \setuplist[section][alternative

Re: [NTG-context] doublesided wider paragraphs

2012-05-22 Thread Wolfgang Schuster
the example work? \usemodule[annotation] \define[2]\FullwidthCommand {\doifoddpageelse {\doadaptrightskip{-\the\dimexpr\rightmarginwidth+\rightmargindistance\relax}} {\doadaptleftskip {-\the\dimexpr\leftmarginwidth +\leftmargindistance \relax}}% #2} \defineannotation[fullwidth

[NTG-context] placing (on) layers

2022-04-15 Thread Henning Hraban Ramm via ntg-context
Hi again, I’m always struggling with putting stuff on layers, since these just never start where I’d expect them to, and the offsets changed a few times within the last years. Please explain how I should define a layer that covers the whole page, since the following MWE is wrong (the layer

Re: [NTG-context] placing (on) layers

2022-04-16 Thread Pablo Rodriguez via ntg-context
On 4/15/22 21:51, Henning Hraban Ramm via ntg-context wrote: > Hi again, > > I’m always struggling with putting stuff on layers, since these just > never start where I’d expect them to, and the offsets changed a few > times within the last years. > > Please explain how I

Re: [NTG-context] defs, variables and dimensions (was: passing variables/data between context and lua)

2019-09-29 Thread Martin Althoff
Hi Hraban, I can't answer your question counter or \define. However in my specific situation I would not use the number as a counter but just as a value. Actually my situation is an exam in which the total points are 44. From these I want to calculate percentages. And, as I find it easier

Re: [NTG-context] Linebreak in a framed for a chapter setuphead

2012-02-29 Thread Wolfgang Schuster
? \define[2]\mychap {\framed [frame=off,width=broad,align=flushleft,bottomframe=on,offset=0pt] {\setbox\scratchbox\hbox{#1}% \vtop{\hsize\dimexpr\hsize-\wd\scratchbox\relax#2}% \box\scratchbox}} \setuphead[chapter][command=\mychap,textstyle=\tfa,numberstyle=\tfd] \starttext

[NTG-context] Too large value of \definecolumnsethsize

2012-07-24 Thread Marco
error? If the figure width is slightly decreased (see the commented part), the first page looks as intended. But that's exactly what the command \definecolumnsethsize is for -- to get the correct size. Another workaround is to define the column width, so it is a know value. The behaviour

Re: [NTG-context] delimitedtext, spacebefore and grid

2011-02-12 Thread Wolfgang Schuster
installation): \setuplayout[grid=yes]\showgrid \setupbodyfont[14pt] \usemodule[annotation] \define[2]\ZitatCommand {\topskip\dimexpr\topskip+\lineheight/2\relax \startnarrower “#2”% \stopnarrower} \defineannotation [zitat] [alternative=command, command=\ZitatCommand, spacebefore

Re: [NTG-context] delimitedtext, spacebefore and grid

2011-02-14 Thread Oliver Buerschaper
Not sure if there are side effects but this works (requires mkiv and a recent installation): \setuplayout[grid=yes]\showgrid \setupbodyfont[14pt] \usemodule[annotation] \define[2]\ZitatCommand {\topskip\dimexpr\topskip+\lineheight/2\relax \startnarrower “#2”% \stopnarrower

[NTG-context] Feature Request: ToC page number alternative

2014-02-26 Thread Thangalin
,] \setupcombinedlist[content][interaction=all,] \unprotect \define[3]\SectionToCEntry{% \hbox \strc_lists_get_reference_attribute\v!all{% \par \leftaligned\bgroup \hbox to 2em{#3}% \hskip 1em \vtop{\hsize\dimexpr\textwidth-3em\relax#2} \egroup \par% } } \protect

[NTG-context] Bug with custom TOC

2014-11-07 Thread Michał Goliński
The following example is taken from the wiki (http://wiki.contextgarden.net/Command/setuplist): \define[3]\SectionToCEntry{ \leftaligned\bgroup \hbox to 2em{#3}% \hskip 1em \vtop{\hsize\dimexpr\textwidth-3em\relax#2}% \egroup } \setuplist [part] [alternative=interactive

Re: [NTG-context] Bug with custom TOC

2014-11-08 Thread Wolfgang Schuster
Am 07.11.2014 um 15:04 schrieb Michał Goliński golin...@amu.edu.pl: The following example is taken from the wiki (http://wiki.contextgarden.net/Command/setuplist): \define[3]\SectionToCEntry{ \leftaligned\bgroup \hbox to 2em{#3}% \hskip 1em \vtop{\hsize\dimexpr\textwidth

Re: [NTG-context] defs, variables and dimensions

2019-09-28 Thread Wolfgang Schuster
Henning Hraban Ramm schrieb am 28.09.2019 um 08:53: Am 2019-09-27 um 14:58 schrieb Wolfgang Schuster : \define\question{44} \defineexpandable\question{44} Would it make sense to use a counter or some other TeX construct? Is it better to use \setvariable(s) for simple values than any \def

Re: [NTG-context] defs, variables and dimensions (was: passing variables/data between context and lua)

2019-09-28 Thread Henning Hraban Ramm
> Am 2019-09-27 um 14:58 schrieb Wolfgang Schuster > : > >> \define\question{44} > \defineexpandable\question{44} Would it make sense to use a counter or some other TeX construct? Is it better to use \setvariable(s) for simple values than any \def? Should I use a \newdime

[NTG-context] Custom list layout with PDF bookmarks

2020-05-15 Thread Bruce Horrocks
When I customise the table of contents layout I lose the automatic hyperlinks. Is there a simple configuration option that I have missed or do I need to create my own links somehow? Example: \setupinteraction[state=start] \setupinteractionscreen[option=bookmark] \define[3]\SectionListEntry

Re: [NTG-context] Custom list layout with PDF bookmarks

2020-05-16 Thread Henning Hraban Ramm
etupinteraction[state=start] > \setupinteractionscreen[option=bookmark] > > \define[3]\SectionListEntry > {\par \leftaligned\bgroup > \hbox to 2em{#3}% > \hskip 1em > \vtop{\hsize\dimexpr\textwidth-3em\relax#2} > \egroup \par} > > % Comment o

Re: [NTG-context] Custom list layout with PDF bookmarks

2020-05-16 Thread Henning Hraban Ramm
I need to create my own links somehow? >> >> Example: >> >> \setupinteraction[state=start] >> \setupinteractionscreen[option=bookmark] >> >> \define[3]\SectionListEntry >> {\par \leftaligned\bgroup >> \hbox to 2em{#3}% >>

Re: [NTG-context] Linebreak in a framed for a chapter setuphead

2012-02-29 Thread Charles
on the left side and the number, with higher size, on the right side. The \mychap seems to work while used directly. Any solution? \define[2]\mychap {\framed [frame=off,width=broad,align=flushleft,bottomframe=on,offset=0pt] {\setbox\scratchbox\hbox{#1}% \vtop{\hsize

Re: [NTG-context] doublesided wider paragraphs

2012-05-22 Thread Andy Thomas
\input tufte \stopfullwidth \input tufte \stoptext My questions are: Is there no more \startlocal, how to locally adjust the layout on a page and how to make the example work? \usemodule[annotation] \define[2]\FullwidthCommand {\doifoddpageelse {\doadaptrightskip{-\the\dimexpr

Re: [NTG-context] Filling a page with \thinrules

2019-12-07 Thread Rik Kabel
, but maybe nowadays one could also right a more readable lua code to achieve the same. Best regards: Otared K. \define\thinrulesfillpage% { \hphantom{Answer} % this is necessary, I don't know why... \blank \scratchcounter\dimexpr(\pagegoal-\pagetotal-2\lineheight

Re: [NTG-context] Getting width of text to be typeset

2020-05-22 Thread Rik Kabel
uot;inject" TeX workflow or whether to access LuaTeX internals (nodes?) to get the desired information. - Is it possible somehow? Too easy ... \startluacode function document.whatever() context(nodes.hpack(tex.getnest().head.next).width) end \stopluacode \unex

Re: [NTG-context] margin notes (was: lmtx update)

2020-08-01 Thread Henning Hraban Ramm
relax, width=\ColWidth, align=flushleft, ]{% \inframed[ width=\ColWidth, align=right, frame=off, offset=overlay, strut=yes, ]{#1}% }% } \define\PlaceFootnote{% \inmargin[ voffset=\dimexpr-\FNVOffset\lineheight\relax, width=\ColWidth, ]{% \vtop{\placelocalnotes

Re: [NTG-context] placing (on) layers

2022-04-16 Thread Willi Egger via ntg-context
ng stuff on layers, since these just never > start where I’d expect them to, and the offsets changed a few times within > the last years. > > Please explain how I should define a layer that covers the whole page, since > the following MWE is wrong (the layer always starts below the f

Re: [NTG-context] about the defining itemized columns.

2018-07-26 Thread Hans Hagen
way to define them in one definition? It may be my greedy hope. \define[1]\iCol {\starttabulate[|*{#1}{|lw(\dimexpr.84\makeupwidth/#1\relax)|}]} - Hans Hagen | PRAGMA ADE

Re: [NTG-context] Margin heading problem, was Re: sections

2014-06-05 Thread Rik Kabel
? no, unrelated, try this: \setuphead [section] [after={\strut\blank[-2*line,samepage,disable]}, command=\SectionCommand, distance=0pt] \define[2]\SectionCommand{\inleft{XX}} That was fine until it ran into \setupwhitespace with a non-zero value. Fiddling with the after key \blank

Re: [NTG-context] beta

2009-04-23 Thread Wolfgang Schuster
Hi Lutz, the tfm's and map file I used in my typescript are part of the lucida package from TUG. Wolfgang Am 23.04.2009 um 11:51 schrieb Lutz Haseloff: Thanks Wolfgang, but I got following error: define font | font with name hlcrim is not found math virtual | loading font lucidamath

[NTG-context] Consistent Colors

2013-01-29 Thread Devendra Ghate
] % A macro that generates three shades above and below the given color. % It is assumed here that the RGB values are also passed along with % the color name. \define[4]\generateColorGroup{ \definecolorgroup [#1] [#2:#3:#4] %\dimexpr#2/4:#3/4:#4/4] }% \generateColorGroup{maroon}{0.8}{0.2

[NTG-context] Fwd: Re: styling individual parts of ToC entry

2020-09-07 Thread jbf
\structurelistuservariable{author}}}%    \hfill\currentlistentrypagenumber % pagenumber \egroup    \egroup}    \define[3]\TitleListCommand   {\hbox\bgroup \hbox to 3cm{\currentlistsymbol\hss}% number + labeltext \vtop\bgroup    \hsize\dimexpr\makeupwidth-3cm\relax

Re: [NTG-context] Problems with TABLE

2010-09-30 Thread Peter Münster
On Thu, Sep 30 2010, Patrick Gundlach wrote: I still have some problems with TABLE: \bTABLE[frame=on] We need to know the values for rulethickness and offset, so let's define them: \bTABLE[frame=on, rulethickness=0.5pt, offset=0.1em] \bTD[frame=off,rightframe=on,rulethickness=1mm] abc

Re: [NTG-context] Command that does not give the expected result (Metafun)

2015-08-11 Thread Fabrice Couvreur
...@gmail.com 10. August 2015 09:13 Dear Hans, I tested without understanding what \unexpanded, and of course it works ! You can use ConTeXt’s \define command where you don’t have to think about \unexpanded etc., e.g. \define[2]\ChapterCommand {\setbox\scratchbox\hbox to \leftmarginwidth{#1

Re: [NTG-context] startlines with long lines that break and indent

2021-12-26 Thread Rik Kabel via ntg-context
based on the following, which I made it following suggestions from others. There may well be other ways, but this works for me. \define\Poemindent{3em} \define\Poeminset{14em} \definedelimitedtext[Poe] \setupwhitespace[medium] \showframe \startbuffer[Poem]   This is a long

Re: [NTG-context] Length range control of the last line of paragraph

2016-03-25 Thread Jan Tosovsky
mem > > emememememem > > > > So there are two last line lengths extrems: > > (shortest) > > emememememememememememememememememememem > > emememememem > > > > (longest) > > emememememememememememememememememememem > &g

Re: [NTG-context] Length range control of the last line of paragraph

2016-03-26 Thread Hans Hagen
- case (2) I am afraid I hasn't been clear enough yet. Can I somehow define command globally which takes local block widths? \parfillskip #1 plus \localhsize-#1-#2, where #1 gap width #2 shortest line width \availablehsize So the following \parfillskip specification finally seems to be what I

Re: [NTG-context] Disable overlay on chapter pages

2017-08-04 Thread Mikael P. Sundqvist
ound] [\directsetup{pagebackground}] \setupbackgrounds [page] [background=pagebackground] \startsetups pagebackground \doifelsemode {chapterpage} { \setlayer [chapter] [x=\dimexpr\backspace+\textwidth+\rightmargindistance\relax, y=3in, loca

Re: [NTG-context] Filling a page with \thinrules

2019-12-07 Thread Otared Kavian
readable lua code to achieve the same. Best regards: Otared K. \define\thinrulesfillpage% { \hphantom{Answer} % this is necessary, I don't know why... \blank \scratchcounter\dimexpr(\pagegoal-\pagetotal-2\lineheight)/(\dimexpr\lineheight+2.2ex\relax)\relax

Re: [NTG-context] margin notes (was: lmtx update)

2020-08-01 Thread Otared Kavian
arginNote#1{% > \inmargin[ > voffset=\dimexpr-\FNVOffset\lineheight\relax, > width=\ColWidth, > align=flushleft, > ]{% > \inframed[ >width=\ColWidth, >align=right, >frame=off, >offset=overlay, >strut=yes, >]{#1}% > }% > } >

Re: [NTG-context] placing (on) layers

2022-04-16 Thread Henning Hraban Ramm via ntg-context
with putting stuff on layers, since these just never start where I’d expect them to, and the offsets changed a few times within the last years. Please explain how I should define a layer that covers the whole page, since the following MWE is wrong (the layer always starts below the first line

Re: [NTG-context] custom command \myframedsection does not always work. Bug?

2011-10-30 Thread Wolfgang Schuster
[0.5in]\startframedtext[background=color,backgroundcolor=gray:10]}, after={\stopframedtext\blank[0.25in]}, color=blue*:3] and \define[2]\MyframedsectionCommand {\framed [background=color,backgroundcolor=gray:10,align=flushleft] {\hbox to 2cm{#1}\vtop{\hsize=\dimexpr\hsize-2cm\relax

Re: [NTG-context] custom command \myframedsection does not always work. Bug?

2011-10-30 Thread Curiouslearn
] and \define[2]\MyframedsectionCommand  {\framed     [background=color,backgroundcolor=gray:10,align=flushleft]     {\hbox to 2cm{#1}\vtop{\hsize=\dimexpr\hsize-2cm\relax#2}}} \definehead[myframedsection][section] \setuphead  [myframedsection]  [before={\blank[0.5in]},   command

Re: [NTG-context] Linebreak in a framed for a chapter setuphead

2012-02-29 Thread Charles
to work while used directly. Any solution? \define[2]\mychap {\framed [frame=off,width=broad,align=flushleft,bottomframe=on,offset=0pt] {\setbox\scratchbox\hbox{#1}% \vtop{\hsize\dimexpr\hsize-\wd\scratchbox\relax#2}% \box\scratchbox}} \setuphead[chapter][command

Re: [NTG-context] Margin definition trouble.

2006-05-19 Thread Mojca Miklavec
On 5/19/06, Johannes Graumann wrote: Hello, I define my margins like so: % Papersize is 'letter' \setuppapersize[letter][letter] % CIT thesis regulations: 1 in margins, 1.5 in on the binding side % Johannes: no footer \setuplayout[ margin=1in, backspace=1.5in, footer=0in

Re: [NTG-context] \setuphead and horizontal rules

2008-10-22 Thread Wolfgang Schuster
the wiki and the internet at large, but an inability to precisely word this leaves it difficult to find any previous example of this. Many thanks, Andrew \define[2]\ChapterCommand {\line {\leaders\hbox {\vrule width 1pt height .5\strutht depth -\dimexpr.5\strutht-\linewidth\relax

Re: [NTG-context] Rearrange Table of Contents section page numbers

2014-02-01 Thread Wolfgang Schuster
[title=beta] \stopchapter \startsection[title=alphasec] \stopsection \startchapter [title=gamma] \stopchapter \startsection[title=alphasec] \stopsection \stoptext How do you determine whether or not the chapter title should be displayed? \define[3]\SectionListEntry {\par

Re: [NTG-context] How to make floats extend into the outer margin

2014-07-24 Thread Joshua Krämer
={} manually, but it doesn't work. May it be even possible to let Context automatically determine if the float is to be turned right or left, depending on its page? By the way, is \definemeasure meant as a replacement for \newdimen and \dimexpr? Are there caveats about switching to it? Thanks and kind

Re: [NTG-context] \vfill shifts content off grid

2016-09-04 Thread Wolfgang Schuster
ou can determine how much space is left on the page and with the \getnoflines command you get the number of lines for the free space. begin example \define\MoveToBottom {\par \dowithnextbox {\scratchdimen\dimexpr\pagegoal-\pagetotal-\nextboxht-\lineheight\relax \getno

Re: [NTG-context] itemize columns transposed

2016-10-11 Thread Wolfgang Schuster
orizontal][inner={\setupinterlinespace[line=6ex]}] \startitem First \stopitem \startitem Second \stopitem \startitem Third \stopitem \startitem Fourth \stopitem \stopitemize \stoptext or add a invisible symbol with increased height/depth at the begin of each item, e.g. \define\HorizontalIte

[NTG-context] expansion problem: random location

2019-09-13 Thread Henning Hraban Ramm
() context(locations[math.random(1,#locations)]) end \stopluacode \newdimen\PicWidth \PicWidth=\textwidth \define[1]\Blindbild{ \getrandomnumber\imgH{1}{9} \PicWidth=\textwidth \doif{#1}{left}{\PicWidth=.4\textwidth} \doif{#1}{right}{\PicWidth=.4\textwidth} \startplacefigure[location={#1},title={#1

[NTG-context] Shift tabulate into margin and center

2020-05-04 Thread Tim Steenvoorden
=middle] \define\fullwidth{\dimexpr(\leftmargindistance+\leftmarginwidth+\textwidth)} \section{First} \subsection{First first} \input tufte \setupnarrower[left=-9pc] \startnarrower[left] \startframedtext[frame=off,topframe=on,bottomframe=on,align=middle,width=\fullwidth] The whole frame should

Re: [NTG-context] Shift tabulate into margin and center

2020-05-05 Thread Tim Steenvoorden
r=0pc, > height=49pc, > footer=0pc, > bottomdistance=2.5pc, > bottom=1pc, > location=middle] > > \define\fullwidth{\dimexpr(\leftmargindistance+\leftmarginwidth+\textwidth)} > > \section{First} > \subsection{First first} > > \input tufte > > \setupnarrower[left=

Re: [NTG-context] styling individual parts of ToC entry

2020-09-06 Thread Wolfgang Schuster
to the \ChapterListCommand do I need to make to accommodate the following? Possibly an \else statement, but not sure how to include that: \startchapter [title={Chapter title}] [author={Author Name}] I forgot to change the argument for the check off the author entry, this should fix it. \define[3

[NTG-context] space between chapter and chapter number (in words)

2020-10-14 Thread jbf
nothing to solve the problem: \define[3]\ChapterListCommand   {\hbox\bgroup \hbox to 2.5cm{\currentlistsymbol\hss}% number + labeltext \vtop\bgroup    \hsize\dimexpr\makeupwidth-2.5cm\relax    \doifsomething{\rawstructurelistuservariable{year

[NTG-context] TIL: figure combinations

2022-08-11 Thread Henning Hraban Ramm via ntg-context
You probably know about combinations to place images side by side: \startcombination[3*1] {\externalfigure[cow]}{cow} {\externalfigure[mill]}{mill} {\externalfigure[hacker]}{hacker} \stopcombination Now, the widths aren’t calculated automatically. You could define them on your own

Re: [NTG-context] Bugs in linenumbering ?

2014-04-03 Thread Stéphane Goujet
[narcite][left=\repshift,before=,after=] \define\startbloccite{\startnarcite[left]\setupindenting[first,yes,\dimexpr\parindent-\repshift]\startlinenumbering[repcite]«} \define\startbloccitel{\startnarcite[left]\setupindenting[first,yes,\dimexpr\parindent-\repshift]\startlinenumbering[repcitel]«} \define

Re: [NTG-context] Missing \dddot and \ddddot

2006-09-15 Thread Aditya Mahajan
to interlinespace? one cannot define a measure globally this way, since an ex is font dependent,; \def\amstexex{\dimexpr.08\lineheight\relax} The latex package amsgen.sty define it more carefully \newdimen\ex@ [EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED] [EMAIL PROTECTED]@{% \begingroup

Re: [NTG-context] Consistent Colors

2013-01-29 Thread Devendra Ghate
:0.2:0.4, %0.4:0.1:0.2, %0.2:0.05:0.1] % A macro that generates three shades above and below the given color. % It is assumed here that the RGB values are also passed along with % the color name. \define[4]\generateColorGroup{ \definecolorgroup [#1] [#2:#3:#4] %\dimexpr#2/4:#3

Re: [NTG-context] Margin heading problem, was Re: sections

2014-06-02 Thread Rik Kabel
[section] [after={\strut\blank[-2*line,samepage,disable]}, command=\SectionCommand, distance=0pt] \define[2]\SectionCommand{\inleft{XX}} That was fine until it ran into \setupwhitespace with a non-zero value. Fiddling with the after key \blank does not appear to help. \define

Re: [NTG-context] Missing \dddot and \ddddot

2006-09-15 Thread Hans Hagen
to interlinespace? one cannot define a measure globally this way, since an ex is font dependent,; \def\amstexex{\dimexpr.08\lineheight\relax} or so may be better \def\dotsadjustbox#1% {\vbox to -1.4\amstexex{\kern-2\amstexex \hbox{\the\textfont\zerocount#1}\vss}} \def\dddot#1% {{\mathop{#1

[NTG-context] Toward the use of inleft for custom secti on's command… or not…

2010-11-24 Thread Renaud AUBIN
{ \blank % just because I always need some vertical space just before my Section \inleft{\bfa #1} {\line{\leaders\hbox{\vrule width 1pt height .5\strutht depth -\dimexpr.5\strutht-\linewidth\relax} \hfil}} \blank[-1*big] % Are you kidding me with that negative blank??? } \define[4

Re: [NTG-context] Vertically centered text in each page

2016-03-02 Thread Andreas Schneider
header] [width=\paperwidth, height=\paperheight] \define[2]\setheader{% \resetlayer[header]% \setlayer[header]% [preset=lefttop, x=10mm, y=5mm, width=15cm, heigth=40pt]% {#2}% } \define[2]\setsubtitle{% \setlayer[header]% [preset=lefttop, x=10mm, y=\dimexpr(5mm+40pt), width=15cm,

Re: [NTG-context] beta

2009-04-23 Thread Lutz Haseloff
Thanks Wolfgang, but I got following error: define font | font with name hlcrim is not found math virtual | loading font lucidamath subfont 2 with name hlcrim at 458752 is skipped, not found define font | font with name hlcry is not found math virtual | loading font lucidamath subfont 3 with name

Re: [NTG-context] beta

2009-04-23 Thread Lutz Haseloff
23.04.2009 um 11:51 schrieb Lutz Haseloff: Thanks Wolfgang, but I got following error: define font | font with name hlcrim is not found math virtual | loading font lucidamath subfont 2 with name hlcrim at 458752 is skipped, not found define font | font with name hlcry is not found math virtual

Re: [NTG-context] styling individual parts of ToC entry

2020-09-06 Thread jbf
ter Two. I assume I would set up a third definition called \SectionListCommand. Sections will have different labels too - one will be called 'Context', the other 'Reflection'. \define[3]\TitleListCommand   {\hbox\bgroup \hbox to 3cm{\currentlistsymbol\hss}% number + labeltext \vtop\bgr

Re: [NTG-context] Test whether variable has been set

2007-05-27 Thread Peter Rolf
? As long as you can garantee, that your variables are declared *before* they are read, things are ok. But an environment or extra file is IMO the cleanest way. Reading an undefined variable results in the \empty token. This can be problematic, if you expect a number; e.g. \dimexpr\getvariable{foo

Re: [NTG-context] bug? gap appears in columnset

2013-09-17 Thread Hans Hagen
On 9/17/2013 8:57 PM, Lars Huttar wrote: Can you point me to documentation on the constraints that define what kind of interlinespace is sane? the default is 2.8ex which is pretty safe, then there is the ht/dp ratio which in some cases has to be adapted to fonts esp when they are non

[NTG-context] Strange behavior (TikZ)

2015-08-11 Thread Fabrice Couvreur
currentpicture to p ; \stopuniqueMPgraphic \defineoverlay[titled][\uniqueMPgraphic{titled}] \define[2]\ChapterCommand {\setbox\scratchbox\hbox to \leftmarginwidth{#1\hss}% \hskip-\dimexpr\leftmarginwidth+\leftmargindistance\relax \framed [background=titled,frame=off,offset=0pt] {\box

Re: [NTG-context] Length range control of the last line of paragraph

2016-03-25 Thread Jan Tosovsky
narrow blocks, which is not my use case). \showmakeup[glue] \setupindenting[yes,2em] \edef\ward{\cldloadfile{ward}} \setupalign[verystrict,hz] \starttext \dorecurse{100}{ \hsize\dimexpr\textwidth-#1mm\relax \dimen0=\hsize \advance\dimen0 by -8em % 3*em - 2em \parfillskip

Re: [NTG-context] itemize columns transposed

2016-10-11 Thread Mikael P. Sundqvist
t; \startitem Fourth \stopitem > \stopitemize > > \stoptext > > > or add a invisible symbol with increased height/depth at the begin of each > item, e.g. > > \define\HorizontalItem > {\phantombox[height=\strutht,depth=\dimexpr\strutdp+\lineheight\relax]} > >

Re: [NTG-context] notes in the margin

2018-02-12 Thread Henning Hraban Ramm
v) I just need a way to transfer this option through \footnote: I used a global definition that I redefine where I need it: \def\FNVOffset{0} % vertical shift of footnotes in negative lines % this is unclean, but works quite well \define\PlaceFootnote% {\inmargin[voffset=\dimexpr-\FNVOffset\

Re: [NTG-context] Length range control of the last line of paragraph

2016-03-25 Thread Hans Hagen
] \edef\ward{\cldloadfile{ward}} \setupalign[verystrict,hz] \starttext \dorecurse{100}{ \hsize\dimexpr\textwidth-#1mm\relax \dimen0=\hsize \advance\dimen0 by -8em % 3*em - 2em \parfillskip 2em plus \dimen0\relax \ward \par \parfillskip 2em plus \dimen0\relax

Re: [NTG-context] Filling a page with \thinrules

2019-12-07 Thread Hans Hagen
progress. For the record, below is a transcript of what I adapted from Wolfgang's solution, but maybe nowadays one could also right a more readable lua code to achieve the same. Best regards: Otared K. \define\thinrulesfillpage% { \hphantom{Answer} % this is necessary, I don't

Re: [NTG-context] notes in the margin

2019-10-04 Thread Henning Hraban Ramm
, frame=off, offset=overlay, strut=yes, ]{#1}% }% } \define\PlaceFootnote{% \inmargin[ voffset=\dimexpr-\FNVOffset\lineheight\relax, width=\ColWidth, ]{% \vtop{\switchtobodyfont[6pt]\placelocalnotes[footnote][before=,after=]}}% } \def\FNo#1{{#1~}} %\crlf\gobblespacetokens

Re: [NTG-context] margin notes (was: lmtx update)

2020-08-01 Thread Otared Kavian
, strut=yes, ]{#1}% }% } \define\PlaceFootnote{% \inmargin[ voffset=\dimexpr-\FNVOffset\lineheight\relax, % width=\ColWidth, ]{% \vtop{\placelocalnotes[footnote][before=,after

Re: [NTG-context] how to get thick and thin borders working in tables (ConTeXt)

2008-12-11 Thread Lars Huttar
frame everywhere else: \startuseMPgraphic{table:frame:Lrtb} % left border is double draw leftboundary OverlayBox enlarged \the\dimexpr\linewidth*1\relax ; % outer frame draw leftboundary OverlayBox enlarged -\the\dimexpr\linewidth*2\relax ; % inner frame draw rightboundary OverlayBox enlarged

[NTG-context] Need help defining command.

2013-10-22 Thread Keith J. Schultz
HI All, I remember seeing some seeing what I want to do but I can not find it. I would like to define a command that takes an optional key-valued list and 1 or 2 manditory ones. Something like \unexanded\def\MyCommand[#1]#2% {% \NassiGroupFrame[#1]{#2}% }% or \unexanded\def\MyCommand[#1]#2

Re: [NTG-context] styling individual parts of ToC entry

2020-09-05 Thread Wolfgang Schuster
: % \define[1]\TitleTocEntry{%   #1\hskip 1cm% title    \structurelistuservariable{author}%   } \setuplist[title][textstyle=bold,   textcommand=\TitleTocEntry, ] %--- /Question 1:/ /How to get the two author names to line up vertically./ Given that I have both

[NTG-context] correct vertical alignment in ToC

2020-09-29 Thread jbf
the definition below) and section authors (given its definition below), I could solve this problem, but everything I have tried does not seem to work. Wolfgang had given me the ChapterListCommand definition, and I think Hraban the SectionTocentry: (1) CHAPTERLISTCOMMAND \define[3]\ChapterListCommand

  1   2   >